package com.po.service.impl;

import com.po.mapper.ArticleMapper;
import com.po.pojo.Article;
import com.po.scrapy.spiders.RedWebProcessor;
import com.po.service.ArticleService;
import org.omg.PortableInterceptor.INACTIVE;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import us.codecraft.webmagic.Spider;
import us.codecraft.webmagic.pipeline.ConsolePipeline;

/**
 * @author zxw
 * @date 2020/7/28 21:08
 */
@Service
public class ArticleServiceImpl implements ArticleService {
    @Autowired
    private ArticleMapper articleMapper;


    @Override
    public Article findByUrl(String url) {
        Article article = articleMapper.findByUrl(url);
        return article;
    }

    @Override
    public Integer insert(Article article) {
        return articleMapper.insert(article);
    }
}
